/**
 * @author ：wang-ting
 * @Date：2025/5/6 22:59
 */

/**
 * 一球从h米高度自由落下，每次落地后反弹回原高度的一半再落下，求它在第n次落地时共经过了多少米？第n次反弹多高？
 */
import java.util.Scanner;
public class 小球路程 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        float h = scanner.nextFloat();
        int n = scanner.nextInt();
        double sum = 0.0;
        double reHeight = 0.0;
        for (int i = 0; i < n; i++) {
            sum += (h + reHeight);
            reHeight = h / 2;
            h /= 2;
        }
        System.out.println(String.format("%.3f", h) + " " + String.format("%.3f", sum));


        //输出格式为：System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));

    }
}
